/**
 *  Class OtrMediaManager is part of the project OtrMediaManager
    Copyright (C) 2014  Gerrit Eichel

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package otrmediamanager;

import otrmediamanager.otr.*;

import java.io.*;

public class OtrMediaManager {

	public static void main(String[] args) {
		OtrUser otrUser = new OtrUser(args[0], args[1]);
		File otrOutputFolder = new File("/Users/gerrit/otrmediamanager");
		File otrSourceFile = new File("/Users/gerrit/otrmediamanager/Das_Gesetz_der_Ehre_14.06.21_22-25_pro7_165_TVOON_DE.mpg.HQ.avi.otrkey");

		try {
			System.out.println("Username : " + otrUser.getUsername());
			System.out.println("Password :" + otrUser.getUserPassword());
			OtrDecoderOptions otrDecoderOptions = new OtrDecoderOptions(otrUser, otrSourceFile, otrOutputFolder);
			OtrDecoderProcess otrDecoder = new OtrDecoderProcess(otrDecoderOptions);
			otrDecoder.ExecuteOtrDecoder();

			System.exit(0);
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
